package pro.shushi.pamirs.demo.api.model;

import pro.shushi.pamirs.boot.base.ux.annotation.field.UxWidget;
import pro.shushi.pamirs.boot.base.ux.annotation.view.UxTableSearch;
import pro.shushi.pamirs.demo.api.enumeration.ItemStatusEnum;
import pro.shushi.pamirs.demo.api.enumeration.ItemStockStatusEnum;
import pro.shushi.pamirs.meta.annotation.Field;
import pro.shushi.pamirs.meta.annotation.Model;
import pro.shushi.pamirs.meta.base.common.CodeModel;
import pro.shushi.pamirs.meta.enmu.DateFormatEnum;
import pro.shushi.pamirs.meta.enmu.DateTypeEnum;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * code的生成规则可指定类型：pro.shushi.pamirs.meta.enmu.SequenceEnum
 */
@Model.model(DemoStudent.MODEL_MODEL)
@Model(displayName = "测试学生", labelFields = "name")
@Model.Code(sequence = "SEQ", prefix = "IT", size = 8)
public class DemoStudent extends CodeModel {

    private static final long serialVersionUID = -5104390780952631397L;

    public static final String MODEL_MODEL = "demo.DemoStudent";

    @UxTableSearch.FieldWidget(@UxWidget())//支持搜索
    @Field.String
    @Field(displayName = "学生名称")
    private String name;


    @Field.String
    @Field(displayName = "学生地址")
    private String addres;


    @Field.Html
    @Field(displayName = "学生描述")
    private String description;


    @Field(displayName = "学生年龄")
    private Integer age;


    @Field.one2many
    @Field(displayName = "商品属性")
    @Field.Relation(relationFields = "id",referenceFields = "studentId")
    private List<DemoItemAttribute> itemAttributes;

}
